
#include "tcpClient.hpp"
#include <iostream>
#include <memory>

using namespace std;
using namespace Client;

static void Usage(string proc)
{
    cout << "\nUsage:\n\t" << proc << " local_port\n\n"
         << endl;
    exit(1);
}

//.tcpClient serverip serverport
int main(int argc, char *argv[])
{
    if (argc != 3)
    {
        Usage(argv[0]);
    }

    string serverip = argv[1];
    uint16_t serverport = atoi(argv[2]);
    unique_ptr<TcpClient> tcli(new TcpClient(serverip, serverport));

    tcli->initClient();
    tcli->start();

    return 0;
}